import { Router } from 'express';
import { ClientArtistController } from '../../api/controllers/artistController';
import { authenticateClient } from '../../middleware/auth';
const router = Router();
const artistController = new ClientArtistController();

/**
 * @swagger
 * /api/client/artists:
 *   get:
 *     summary: 获取艺人列表
 *     tags: [客户端艺人]
 *     parameters:
 *       - in: query
 *         name: page
 *         schema:
 *           type: integer
 *         description: 页码
 *       - in: query
 *         name: limit
 *         schema:
 *           type: integer
 *         description: 每页数量
 *       - in: query
 *         name: status
 *         schema:
 *           type: string
 *         description: 状态
 *     responses:
 *       200:
 *         description: 获取成功
 */
router.get('/',authenticateClient, artistController.getArtistList);

/**
 * @swagger
 * /api/client/artists/{id}:
 *   get:
 *     summary: 获取艺人详情
 *     tags: [客户端艺人]
 *     parameters:
 *       - in: path
 *         name: id
 *         required: true
 *         schema:
 *           type: integer
 *         description: 艺人ID
 *     responses:
 *       200:
 *         description: 获取成功
 *       404:
 *         description: 艺人不存在
 */
router.get('/:id', authenticateClient, artistController.getArtistDetail);

/**
 * @swagger
 * /api/client/artists/{id}/performances:
 *   get:
 *     summary: 获取艺人演出
 *     tags: [客户端艺人]
 *     parameters:
 *       - in: path
 *         name: id
 *         required: true
 *         schema:
 *           type: integer
 *         description: 艺人ID
 *       - in: query
 *         name: page
 *         schema:
 *           type: integer
 *         description: 页码
 *       - in: query
 *         name: limit
 *         schema:
 *           type: integer
 *         description: 每页数量
 *     responses:
 *       200:
 *         description: 获取成功
 *       404:
 *         description: 艺人不存在
 */
router.get('/:id/performances', authenticateClient, artistController.getArtistPerformances);

/**
 * @swagger
 * /api/client/artists/{id}/works:
 *   get:
 *     summary: 获取艺人作品
 *     tags: [客户端艺人]
 *     parameters:
 *       - in: path
 *         name: id
 *         required: true
 *         schema:
 *           type: integer
 *         description: 艺人ID
 *       - in: query
 *         name: page
 *         schema:
 *           type: integer
 *         description: 页码
 *       - in: query
 *         name: limit
 *         schema:
 *           type: integer
 *         description: 每页数量
 *     responses:
 *       200:
 *         description: 获取成功
 *       404:
 *         description: 艺人不存在
 */
router.get('/:id/works', authenticateClient, artistController.getArtistWorks);

export default router;